package com.gg.registration.statistics.controller;

import com.gg.common.result.CommonResult;
import com.gg.common.result.ResultCodeEnum;
import com.gg.registration.statistics.feignClient.OrderFeignClient;
import com.gg.registration.vo.order.OrderCountQueryVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Author：  chenjunjia
 * Date：    2022/4/29 20:56
 * WeChat：  China_JoJo_
 */
@RestController
@RequestMapping(value = "/admin/statistics")
public class StatisticsController {

    @Resource
    private OrderFeignClient orderFeignClient;

    /**
     * 查询订单总数、日期
     * @param orderCountQueryVo 查询条件
     * @return
     */
    @GetMapping("getCountMap")
    public CommonResult getCountMap(OrderCountQueryVo orderCountQueryVo) {
        return new CommonResult(ResultCodeEnum.SUCCESS,orderFeignClient.getCountMap(orderCountQueryVo));
    }
}
